package helloworld.dao;

import helloworld.model.MyUser;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

/**
 * Created by admin on 2017/3/4.
 */
public interface MyUserDao extends JpaRepository<MyUser, Integer> {
    @Query(value="SELECT a.* from user a where a.weixin_name=:name",nativeQuery = true)
    MyUser getUserByName(@Param("name") String name);
}
